(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

f(f(x)) → f(x)
f(s(x)) → f(x)
g(s(0)) → g(f(s(0)))

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of g: f

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
f(f(x)) → f(x)

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

g(s(0)) → g(f(s(0)))
f(s(x)) → f(x)

Rewrite Strategy: INNERMOST

(3) CpxTrsMatchBoundsProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match Bound [MATCHBOUNDS1,MATCHBOUNDS2] of 2.
The certificate found is represented by the following graph.
Start state: 3
Accept states: [4]
Transitions:
3→4[g_1|0, f_1|0, f_1|1]
3→5[g_1|1]
4→4[s_1|0, 0|0]
5→6[f_1|1]
5→7[f_1|2]
6→7[s_1|1]
7→4[0|1]

(4) BOUNDS(1, n^1)

(5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

g(s(0)) → g(f(s(0)))
f(s(z0)) → f(z0)
Tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
S tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
K tuples:none
Defined Rule Symbols:

g, f

Defined Pair Symbols:

G, F

Compound Symbols:

c, c1

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

g(s(0)) → g(f(s(0)))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(s(z0)) → f(z0)
Tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
S tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
K tuples:none
Defined Rule Symbols:

f

Defined Pair Symbols:

G, F

Compound Symbols:

c, c1

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
We considered the (Usable) Rules:

f(s(z0)) → f(z0)
And the Tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(F(x1)) = x1   
POL(G(x1)) = [2]x1   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(f(x1)) = 0   
POL(s(x1)) = [1] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(s(z0)) → f(z0)
Tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
S tuples:none
K tuples:

G(s(0)) → c(G(f(s(0))), F(s(0)))
F(s(z0)) → c1(F(z0))
Defined Rule Symbols:

f

Defined Pair Symbols:

G, F

Compound Symbols:

c, c1

(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(12) BOUNDS(1, 1)